package com.contactsconverter.widget;



import com.contactsconverter.R;
import com.contactsconverter.utils.FontManager;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.TextView;

public class TNTextView extends TextView{

	public TNTextView(Context context, AttributeSet attrs) {
		super(context, attrs);
		TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Fonts);
		String family = a.getString(R.styleable.Fonts_fontFamily);
		int style = a.getInt(R.styleable.Fonts_android_textStyle, -1);
		a.recycle();
		
		setTypeface(FontManager.getInstance().get(family, style));
	}

	public TNTextView(Context context) {
		super(context);
	}
	
}
